package com.gateon.hw.client.system.client;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gateon.hw.base.vo.Result;
import com.gateon.hw.client.system.req.UserAddReq;
import com.gateon.hw.client.system.req.UserListReq;
import com.gateon.hw.client.system.req.UserUpdateReq;
import com.gateon.hw.client.system.resp.UserResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
*  user实体bean
* Created by leslie on 2020-3-16 13:32:07
*/
@FeignClient("system-service")
public interface UserClient {
    @PostMapping("/User/list")
    Result<Page<UserResp>> list(@RequestBody UserListReq req);

    @PostMapping("/User/{id}")
    Result<UserResp> detail(@PathVariable("id") Long id);

    @PostMapping("/User/insert")
    Result insert(@RequestBody UserAddReq req);

    @PostMapping("/User/update")
    Result update(@RequestBody UserUpdateReq req);

    @PostMapping("/User/delete/{id}")
    Result delete(@PathVariable("id") Long id);

}
